source random.tcl

puts [getBuffer 1 10 10]
for {set i 0} { $i <10 } {incr i} {
  puts [randompick { o1.crd o2.crd o3.crd o4.crd}]
}
set result {}
set sum 0
set prob_buffer 100
for {set i 0} { $i <10 } {incr i} {
  lappend result [prob 0.5]
}
foreach r $result {
  set sum [expr $sum + $r]
}
puts "final prob is [expr double($sum)/[llength $result]]"
